POV-Ray : Newsgroups : povray.programming : HF height: bug report : Re: HF height: bug report Server Time
6 Oct 2024 16:15:07 EDT (-0400)
  Re: HF height: bug report  
From: Thorsten Froehlich
Date: 6 Aug 2001 07:03:06
Message: <3b6e796a$1@news.povray.org>
In article <3b6ddda7@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

>   Actually 01 is an octal number ;)
>
>   (In fact, that's another place where you can shoot yourself in the foot
> with C. You might sometimes write something like "i = 011;" to "indent" the
> number with other similar numbers and then you are surprised when the
> program behaves very strangely...)
>
>   This is actually one place where the compiler assumes that the user
> really wanted an octal number and that it wasn't just a mistake.

Exactly.  And in my example (unlike 011) it wouldn't even make a difference
if one wrote 01 or 1.  So why does it make a difference if I write 'ab'? --
Both are features of the language.  They are both a bit "unexpected", but
still perfectly legal!


    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.